import Vue from 'vue'
import Router from 'vue-router'
//小狸
// import VueRouter from 'vue-router'

import DataExpress from '../components/xiaoli/DataExpress'
import DataExpressUrl from '../components/xiaoli/DataExpressUrl'
import AdminList from '../components/xiaoli/AdminList'
import AdminRoleList from '../components/xiaoli/AdminRoleList'
import AdminMenu from '../components/xiaoli/AdminMenu'
import AdminChildMenu from '../components/xiaoli/AdminChildMenu'
import AdminPassword from '../components/xiaoli/AdminPassword'

// 人员
import PersonnelList from '../components/xiaoli/staff/PersonnelList'
import PersonnelLevelList from './pages/staff/PersonnelLevelList'
import PersonnelTypeModify from '../components/xiaoli/staff/PersonnelTypeModify'
import PersonnelListHx from '../components/xiaoli/staff/PersonnelListHx'
import PersonnelTaskList from '../components/xiaoli/staff/PersonnelTaskList'
import PersonnelDateEdit from '../components/xiaoli/staff/PersonnelDateEdit'
import PersonnelEdit from '../components/xiaoli/staff/PersonnelEdit'
import PersonnelDetails from '../components/xiaoli/staff/PersonnelDetails'

//区域列表
import AreaLists from '../components/xiaoli/sqArea/AreaLists'
import AreaAdd from '../components/xiaoli/sqArea/AreaAdd'
import AreaEdit from '../components/xiaoli/sqArea/AreaEdit'

//商户列表
import MerchantsList from '../components/xiaoli/merchants/MerchantsList'
import MerchantsEdit from '../components/xiaoli/merchants/MerchantsEdit'
import MerchantsAdd from '../components/xiaoli/merchants/MerchantsAdd'

// 评价管理
import EvaluatList from '../components/xiaoli/evaluation/List'

//店铺列表
import ShopCooperationInfo from '../components/xiaoli/shop/ShopCooperationInfo'
import ShopList from '../components/xiaoli/shop/ShopList'
import ShopStop from '../components/xiaoli/shop/ShopStop'
import ShopEdit from '../components/xiaoli/shop/ShopEdit'
import ShopAdd from '../components/xiaoli/shop/ShopAdd'
import ShopTag from '../components/xiaoli/shop/ShopTag'
import Opportunity from '../components/xiaoli/shop/Opportunity'
import OpportunityAdd from '../components/xiaoli/shop/OpportunityAdd'
import VisitList from '../components/xiaoli/shop/VisitList'
import ShopAccount from '../components/xiaoli/shop/ShopAccount'
import ShopAccountDetails from '../components/xiaoli/shop/ShopAccountDetails'
import ShopListAccount from '../components/xiaoli/shop/ShopListAccount'

//店铺需求监控
import ShopMonitoring from '../components/xiaoli/shop/ShopMonitoring'
//黑名单管理
import BlackList from '../components/xiaoli/shop/BlackList'

//店铺管理员
import ShopUserList from '../components/xiaoli/shop/ShopUserList'
import ShopUserAdd from '../components/xiaoli/shop/ShopUserAdd'
import ShopUserEdit from '../components/xiaoli/shop/ShopUserEdit'
//需求发布规则列表
import DemandList from '../components/xiaoli/demand/List'
import DemandAdd from '../components/xiaoli/demand/Add'
import DemandEdit from '../components/xiaoli/demand/Edit'

//订单列表
import RoleList from '../components/xiaoli/roledemand/List'
import RoleAdd from '../components/xiaoli/roledemand/Add'
import RoleEdit from '../components/xiaoli/roledemand/Edit'
import RoleMain from '../components/xiaoli/roledemand/Mainrw'
import RoleMainXq from '../components/xiaoli/roledemand/Mainxq'
// 需求预约列表
import AppointmentList from '../components/xiaoli/roledemand/AppointmentList'
//人员未派工记录
import NoworkgetList from '../components/xiaoli/roledemand/NoworkgetList'

//任务列表
import TaskList from '../components/xiaoli/taskList/List'

//全景调度
import Abnormal from '../components/xiaoli/abnormal/List'
//任务派工
import TaskAssignments from '../components/xiaoli/abnormal/TaskAssignments'
//出勤监控
import TaskAttendances from '../components/xiaoli/abnormal/TaskAttendances'
//任务派工
import TaskAssignment from '../components/xiaoli/abnormal/TaskAssignment'

//人找活
import PeopleForWork from '../components/xiaoli/abnormal/PeopleForWork'

//平台出工情况
import Platform from '../components/xiaoli/abnormal/Platform'

//计价管理
import prices from '../components/xiaoli/shopPrice/List'
import PriceBRaiseList from '../components/xiaoli/shopPrice/BRaiseList'
import PriceCRaiseList from '../components/xiaoli/shopPrice/CRaiseList'

//计价规则（废弃）
import priceList from '../components/xiaoli/shopPrice/ListOld'

//加价管理
import premium from '../components/xiaoli/shopPrice/PriceManageList'
import addPrice from '../components/xiaoli/shopPrice/AddPrice'

//单店定价管理
import premiumShop from '../components/xiaoli/shopPrice/ShopAddPriceList'
import ShopAddPrice from '../components/xiaoli/shopPrice/AddShopPrice'


//管理费设置
import platformFee from '../components/xiaoli/shopPrice/ManageFeeList'
import AddManageFee from '../components/xiaoli/shopPrice/AddManageFee'

//异常记录列表
import AbnormalList from '../components/xiaoli/abnormal/AbnormalList'

//人才扣罚列表
import TicketList from '../components/xiaoli/ticket/List'

//人才账单列表
import StaffList from '../components/xiaoli/bill/List'
//账单详情
import BillCont from '../components/xiaoli/bill/BillCont'
//应付账单列表
import PayDetail from '../components/xiaoli/bill/PayDetail'
//扣罚账单列表
import TicketLists from '../components/xiaoli/bill/TicketLists'

//商户账单列表
import BillShopList from '../components/xiaoli/billshop/List'
//商户支付查询
import Payment from '../components/xiaoli/billshop/Payment'

//任务调账
import Adjustment from '../components/xiaoli/billshop/Adjustment'
//人才调账
import Billadjust from '../components/xiaoli/billshop/Billadjust'

//任务调账明细
import AdjustmentList from '../components/xiaoli/billshop/AdjustmentList'

//商户账单明细列表
import ShopPayDetail from '../components/xiaoli/billshop/ShopPayDetail'

//商户订单支付查询
import OrderTradeList from '../components/xiaoli/billshop/OrderTradeList'

// 规模报表 [人才 店铺 店铺商圈]
import StaffScaleReport from '../components/xiaoli/sheet/staff/StaffScaleReport'
import ShopScaleReport from '../components/xiaoli/sheet/shop/ShopScaleReport'
import AreaScaleReport from '../components/xiaoli/sheet/area/AreaScaleReport'
//店铺运营报表
import ShopSheet from '../components/xiaoli/sheet/ShopSheet'
//店铺运营报表
import UserSheet from '../components/xiaoli/sheet/UserSheet'
//人才数据查询
import TalentQuery from '../components/xiaoli/sheet/TalentQuery'
//店铺数据查询
import TalentQueryShop from '../components/xiaoli/sheet/TalentQueryShop'
// 财务及数据  ------------- 报表
//经营报表
import BusinessReport from '../components/xiaoli/sheet/BusinessReport'
//灵活经营报表
import AgileBusinessReport from '../components/xiaoli/sheet/AgileBusinessReport'
//灵活经营报表（商圈）
import AgileBusinessAreaReport from '../components/xiaoli/sheet/AgileBusinessAreaReport'
//灵活儿应收款报表
import FreelanCecollectionReport from '../components/xiaoli/sheet/FreelanCecollectionReport'
//灵活儿应收款报表明细
import ReportDetails from '../components/xiaoli/sheet/ReportDetails'

//帮助中心
import HelpList from '../components/xiaoli/helpcenter/HelpList'
//新增帮助主题
import HelpAdd from '../components/xiaoli/helpcenter/HelpAdd'
//编辑帮助主题
import HelpEdit from '../components/xiaoli/helpcenter/HelpEdit'
//教程管理
import CourseList from '../components/xiaoli/courselist/CourseList'
//新增教程
import CourseAdd from '../components/xiaoli/courselist/CourseAdd'
//编辑教程
import CourseEdit from '../components/xiaoli/courselist/CourseEdit'
//分类管理
import TypeList from '../components/xiaoli/typelist/TypeList'
//新增分类
import TypeAdd from '../components/xiaoli/typelist/TypeAdd'
//编辑分类
import TypeEdit from '../components/xiaoli/typelist/TypeEdit'

//出工活动管理
import WorkActivities from '../components/xiaoli/activities/WorkActivities'
//拉新活动管理
import NewActivities from '../components/xiaoli/activities/NewActivities'
// 平台激励活动
import PlatformReward from '../components/xiaoli/reward/List'
import rewardAdd from '../components/xiaoli/reward/Add'

//异常数据中心
import CancelQuery from '../components/xiaoli/cancelquerys/Cancelquery'

//供应商列表
import SupplierList from '../components/xiaoli/supplier/SupplierList'
import SupplierAdd from '../components/xiaoli/supplier/SupplierAdd'
import SuoolierReport from '../components/xiaoli/supplier/SuoolierReport'
// 供应商账号管理
import Administrator from '../components/xiaoli/supplier/Administrator'

import RecordList from '../components/xiaoli/talentSettlement/RecordList'
import TalentContract from '../components/xiaoli/talentSettlement/TalentContract'
import PaymentApplication from '../components/xiaoli/talentSettlement/PaymentApplication'
import SettlementChannel from '../components/xiaoli/talentSettlement/SettlementChannel'
import ChannelEdit from '../components/xiaoli/talentSettlement/ChannelEdit'
//请假申请审批
import PersonnelLeave from '../components/xiaoli/staff/PersonnelLeave'

import Announcement from '../components/xiaoli/banner/Announcement'
import AnnouncementAdd from '../components/xiaoli/banner/AnnouncementAdd'

import Banner from '../components/xiaoli/banner/Banner'
import BannerAdd from '../components/xiaoli/banner/BannerAdd'
import TaskAppeal from '../components/xiaoli/taskList/TaskAppeal'

import PushList from '../components/xiaoli/messagepush/PushList'
import PushAdd from '../components/xiaoli/messagepush/PushAdd'
import FetchList from '../components/xiaoli/messagepush/FetchList'

// 代理商
import AgentList from '../components/xiaoli/agent/List'
import AgentAdd from '../components/xiaoli/agent/AgentAdd'
import AgentRoleList from '../components/xiaoli/agent/RoleList'
import AgentRoleAdd from '../components/xiaoli/agent/RoleAdd'
import AgentAdminList from '../components/xiaoli/agent/AdminList'
import AgentAdminAdd from '../components/xiaoli/agent/AdminAdd'

//发票管理
import InvoiceList from '../components/xiaoli/invoice/List'
import InvoiceDetails from '../components/xiaoli/invoice/Details'
import InvoiceTaskList from '../components/xiaoli/invoice/TaskList'
import InvoiceStatementList from '../components/xiaoli/invoice/StatementList'
// 补贴
import SubsidyShop from '../components/xiaoli/subsidy/Shop'
import SubsidyArea from '../components/xiaoli/subsidy/Area'
import SubsidyAdd from '../components/xiaoli/subsidy/Add'

Vue.use(Router)

/* Layout */
import Layout from '@/layout'

/**
 * Note: 路由配置项
 *
 * hidden: true                     // 当设置 true 的时候该路由不会再侧边栏出现 如401，login等页面，或者如一些编辑页面/edit/1
 * alwaysShow: true                 // 当你一个路由下面的 children 声明的路由大于1个时，自动会变成嵌套的模式--如组件页面
 *                                  // 只有一个时，会将那个子路由当做根路由显示在侧边栏--如引导页面
 *                                  // 若你想不管路由下面的 children 声明的个数都显示你的根路由
 *                                  // 你可以设置 alwaysShow: true，这样它就会忽略之前定义的规则，一直显示根路由
 * redirect: noRedirect             // 当设置 noRedirect 的时候该路由在面包屑导航中不可被点击
 * name:'router-name'               // 设定路由的名字，一定要填写不然使用<keep-alive>时会出现各种问题
 * query: '{"id": 1, "name": "ry"}' // 访问路由的默认传递参数
 * roles: ['admin', 'common']       // 访问路由的角色权限
 * permissions: ['a:a:a', 'b:b:b']  // 访问路由的菜单权限
 * meta : {
    noCache: true                   // 如果设置为true，则不会被 <keep-alive> 缓存(默认 false)
    title: 'title'                  // 设置该路由在侧边栏和面包屑中展示的名字
    icon: 'svg-name'                // 设置该路由的图标，对应路径src/assets/icons/svg
    breadcrumb: false               // 如果设置为false，则不会在breadcrumb面包屑中显示
    activeMenu: '/system/user'      // 当路由设置了该属性，则会高亮相对应的侧边栏。
  }
 */

// 公共路由
export const constantRoutes = [
  {
    path: '/redirect',
    component: Layout,
    hidden: true,
    children: [
      {
        path: '/redirect/:path(.*)',
        component: () => import('@/views/redirect')
      }
    ]
  },
  {
    path: '/login',
    component: () => import('@/views/login'),
    hidden: true
  },
  {
    path: '/register',
    component: () => import('@/views/register'),
    hidden: true
  },
  {
    path: '/404',
    component: () => import('@/views/error/404'),
    hidden: true
  },
  {
    path: '/401',
    component: () => import('@/views/error/401'),
    hidden: true
  },
  {
    path: '',
    component: Layout,
    redirect: 'index',
    children: [
      {
        path: 'index',
        component: () => import('@/views/index'),
        name: 'Index',
        meta: { title: '首页', icon: 'dashboard', affix: true }
      }
    ]
  },
  {
    path: '/user',
    component: Layout,
    hidden: true,
    redirect: 'noredirect',
    children: [
      {
        path: 'profile',
        component: () => import('@/views/system/user/profile/index'),
        name: 'Profile',
        meta: { title: '个人中心', icon: 'user' }
      }
    ]
  },
  {
    path: '/',
    redirect: {
      // name: 'dataExpress'
      name: 'dataExpressUrl'
    }
  },
  {
    path: '/dataExpressUrl', //首页判断
    name: 'dataExpressUrl',
    component: DataExpressUrl
  },
  {
    path: '/dataExpress', //数据列表
    name: 'dataExpress',
    component: DataExpress,
    meta: {
      title: '数据快报'
    }
  },
  {
    path: '/adminList', //管理员列表
    name: 'adminList',
    component: AdminList,
    meta: {
      title: '人员管理'
    }
  },
  {
    path: '/adminRoleList', //角色列表
    name: 'adminRoleList',
    component: AdminRoleList,
    meta: {
      title: '角色管理'
    }
  },
  {
    path: '/adminMenu', //菜单管理
    name: 'adminMenu',
    component: AdminMenu,
    meta: {
      title: '菜单管理'
    }
  },
  {
    path: '/adminChildMenu', //子菜单管理
    name: 'adminChildMenu',
    component: AdminChildMenu
  },
  {
    path: '/adminPassword', //权限管理修改账户密码
    name: 'adminPassword',
    component: AdminPassword
  },
  {
    //人才列表
    path: '/personnelList', //人才列表
    name: 'personnelList',
    component: PersonnelList,
    meta: {
      title: '人才列表'
    }
  },
  {
    //人才等级列表
    path: '/personnelLevelList', //人才等级列表
    name: 'personnelLevelList',
    component: PersonnelLevelList,
    meta: {
      title: '人才等级列表'
    }
  },
  {
    // 人才类型变更
    path: '/personnelTypeModify',
    name: 'personnelTypeModify',
    component: PersonnelTypeModify,
    meta: {
      title: '人才类型变更'
    }
  },
  {
    path: '/personnelListHx', //人才画像
    name: 'personnelListHx',
    component: PersonnelListHx,
    meta: {
      title: '人才画像'
    }
  },
  {
    //人员任务列表
    path: '/personnelTaskList', //人员任务列表
    name: 'personnelTaskList',
    component: PersonnelTaskList,
    meta: {
      title: '人员任务列表'
    }
  },
  {
    //人员上岗时段
    path: '/personnelDateEdit', //人员上岗时段
    name: 'personnelDateEdit',
    component: PersonnelDateEdit,
    meta: {
      title: '人才上岗时段'
    }
  },
  {
    path: '/personnelEdit', //人员修改
    name: 'personnelEdit',
    component: PersonnelEdit,
    meta: {
      title: '人员修改'
    }
  },
  {
    path: '/personnelDetails', //人员详情
    name: 'personnelDetails',
    component: PersonnelDetails
  },
  {
    path: '/areaLists', //区域列表
    name: 'areaLists',
    component: AreaLists,
    meta: {
      title: '管理商圈'
    }
  },
  {
    path: '/areaAdd', //新增区域
    name: 'areaAdd',
    component: AreaAdd
  },
  {
    path: '/areaEdit', //修改区域
    name: 'areaEdit',
    component: AreaEdit
  },
  {
    //商户列表
    path: '/merchantsList', //商户列表
    name: 'merchantsList',
    component: MerchantsList,
    meta: {
      title: '商户管理'
    }
  },
  {
    //商户编辑
    path: '/merchantsEdit', //商户编辑
    name: 'merchantsEdit',
    component: MerchantsEdit
  },
  {
    //商户新增
    path: '/merchantsAdd', //商户新增
    name: 'merchantsAdd',
    component: MerchantsAdd
  },
  {
    //店铺列表
    path: '/shopList',
    name: 'shopList',
    component: ShopList,
    meta: {
      title: '店铺列表'
    }
  },
  {
    // 灵活儿合作
    path: '/shopCooperationInfo',
    name: 'shopCooperationInfo',
    component: ShopCooperationInfo,
    meta: {
      title: '灵活儿合作'
    }
  },
  {
    //暂不下单店铺
    path: '/shopStop',
    name: 'shopStop',
    component: ShopStop,
    meta: {
      title: '暂不下单店铺'
    }
  },
  {
    //商机客户列表
    path: '/opportunity',
    name: 'opportunity',
    component: Opportunity,
    meta: {
      title: '商机客户',
      keepAlive: false
    }
  },
  {
    //新增商机客户
    path: '/opportunityAdd',
    name: 'opportunityAdd',
    component: OpportunityAdd,
    meta: {
      title: '新增商机客户'
    }
  },
  {
    //拜访记录列表
    path: '/visitList',
    name: 'visitList',
    component: VisitList,
    meta: {
      title: '拜访记录'
    }
  },
  {
    //店铺账户
    path: '/shopaccount',
    name: 'shopaccount',
    component: ShopAccount,
    meta: {
      title: '店铺账户'
    }
  },
  {
    //商户余额明细
    path: '/shopAccountDetails',
    name: 'shopAccountDetails',
    component: ShopAccountDetails,
    meta: {
      title: '商户余额明细'
    }
  },
  {
    //店铺需求监控
    path: '/shopMonitoring',
    name: 'shopMonitoring',
    component: ShopMonitoring,
    meta: {
      title: '店铺需求监控'
    }
  },
  {
    //黑名单管理
    path: '/blackList',
    name: 'blackList',
    component: BlackList,
    meta: {
      title: '黑名单管理'
    }
  },
  {
    //店铺编辑
    path: '/shopEdit',
    name: 'shopEdit',
    component: ShopEdit
  },
  {
    //店铺新增
    path: '/shopAdd',
    name: 'shopAdd',
    component: ShopAdd
  },
  {
    //店铺详情
    path: '/shopTag',
    name: 'shopTag',
    component: ShopTag,
    meta: {
      title: '店铺详情'
    }
  },
  {
    //店铺账号列表
    path: '/shopUserList',
    name: 'shopUserList',
    component: ShopUserList,
    meta: {
      title: '店铺账号列表',
      keepAlive: false
    }
  },
  {
    //店铺账号添加
    path: '/shopUserAdd',
    name: 'shopUserAdd',
    component: ShopUserAdd,
    meta: {
      title: '店铺账号添加'
    }
  },
  {
    //店铺账号修改
    path: '/shopUserEdit',
    name: 'shopUserEdit',
    component: ShopUserEdit,
    meta: {
      title: '店铺账号修改'
    }
  },
  {
    //需求发布规则列表
    path: '/demandList',
    name: 'demandList',
    component: DemandList,
    meta: {
      title: '需求发布规则列表'
    }
  },
  {
    //需求发布规则添加
    path: '/demandAdd',
    name: 'demandAdd',
    component: DemandAdd
  },
  {
    //需求发布规则修改
    path: '/demandEdit',
    name: 'demandEdit',
    component: DemandEdit
  },
  {
    //订单列表
    path: '/roleList',
    name: 'roleList',
    component: RoleList,
    meta: {
      title: '订单列表'
    }
  },
  {
    //新增订单
    path: '/roleAdd',
    name: 'roleAdd',
    component: RoleAdd,
    meta: {
      title: '新增订单'
    }
  },
  {
    //需求修改
    path: '/roleEdit',
    name: 'roleEdit',
    component: RoleEdit
  },
  {
    //需求详情
    path: '/roleMain',
    name: 'roleMain',
    component: RoleMain,
    meta: {
      title: '任务详情'
    }
  },
  {
    //报名查询
    path: '/appointmentList',
    name: 'appointmentList',
    component: AppointmentList,
    meta: {
      title: '报名查询'
    }
  },
  {
    //人才未派工记录
    path: '/noworkGetList',
    name: 'noworkGetList',
    component: NoworkgetList,
    meta: {
      title: '人才未派工记录'
    }
  },
  {
    //计价管理
    path: '/prices',
    name: 'prices',
    component: prices,
    meta: {
      title: '计价管理'
    }
  },
  {
    //计价管理
    path: '/priceList',
    name: 'priceList',
    component: priceList,
    meta: {
      title: '计价规则（废弃）'
    }
  },
  {
    //B端加价管理
    path: '/priceBRaiseList',
    name: 'priceBRaiseList',
    component: PriceBRaiseList,
    meta: {
      title: 'B端加价'
    }
  },
  {
    //C端加价管理
    path: '/priceCRaiseList',
    name: 'priceCRaiseList',
    component: PriceCRaiseList,
    meta: {
      title: 'C端加价'
    }
  },
  {
    //new加价管理
    path: '/premium',
    name: 'premium',
    component: premium,
    meta: {
      title: '节假日加价管理'
    }
  },
  {
    //新增加价
    path: '/addPrice',
    name: 'addPrice',
    component: addPrice,
    meta: {
      title: '新增加价'
    }
  },
  {
    //new单店加价管理
    path: '/premiumShop',
    name: 'premiumShop',
    component: premiumShop,
    meta: {
      title: '单店定价管理'
    }
  },
  {
    //单店新增定价
    path: '/ShopAddPrice',
    name: 'ShopAddPrice',
    component: ShopAddPrice,
    meta: {
      title: '新增单店定价'
    }
  },
  {
    //管理费设置
    path: '/platformFee',
    name: 'platformFee',
    component: platformFee,
    meta: {
      title: '技术服务费设置'
    }
  },
  {
    //新增理费设置
    path: '/AddManageFee',
    name: 'AddManageFee',
    component: AddManageFee,
    meta: {
      title: '技术服务费规则'
    }
  },
  {
    //任务列表
    path: '/taskList',
    name: 'taskList',
    component: TaskList,
    meta: {
      title: '任务列表'
    }
  },
  {
    //全景调度
    path: '/abnormal',
    name: 'abnormal',
    component: Abnormal,
    meta: {
      keepAlive: true,
      title: '全景调度'
    }
  },
  {
    //任务派工
    path: '/taskAssignments',
    name: 'taskAssignments',
    component: TaskAssignments,
    meta: {
      keepAlive: true,
      title: '任务派工'
    }
  },
  {
    //出勤监控
    path: '/taskAttendances',
    name: 'taskAttendances',
    component: TaskAttendances,
    meta: {
      keepAlive: true,
      title: '出勤监控'
    }
  },
  {
    //任务派工
    path: '/taskAssignment',
    name: 'taskAssignment',
    component: TaskAssignment,
    meta: {
      keepAlive: true,
      title: '任务派工'
    }
  },
  {
    //人找活
    path: '/PeopleForWork',
    name: 'PeopleForWork',
    component: PeopleForWork,
    meta: {
      keepAlive: true,
      title: '人找活'
    }
  },
  {
    //平台出工情况
    path: '/platform',
    name: 'platform',
    component: Platform,
    meta: {
      keepAlive: true,
      title: '平台出工情况'
    }
  },
  {
    //需求详情
    path: '/roleMainXq',
    name: 'roleMainXq',
    component: RoleMainXq,
    meta: {
      title: '订单详情'
    }
  },
  {
    //异常记录
    path: '/abnormalList',
    name: 'abnormalList',
    component: AbnormalList,
    meta: {
      title: '异常记录'
    }
  },
  {
    //人才扣罚
    path: '/ticketList',
    name: 'ticketList',
    component: TicketList,
    meta: {
      title: '人才扣罚'
    }
  },
  {
    //人才账单
    path: '/staffList',
    name: 'staffList',
    component: StaffList,
    meta: {
      // keepAlive: true,
      title: '人才账单'
    }
  },
  {
    //账单详情
    path: '/billCont',
    name: 'billCont',
    component: BillCont,
    meta: {
      // keepAlive: true,
      title: '账单详情'
    }
  },
  {
    //人才账单明细
    path: '/payDetail',
    name: 'payDetail',
    component: PayDetail,
    meta: {
      title: '人才账单明细'
    }
  },
  {
    //扣罚账单列表
    path: '/ticketLists',
    name: 'ticketLists',
    component: TicketLists
  },
  {
    //商户账单列表
    path: '/billShopList',
    name: 'billShopList',
    component: BillShopList,
    meta: {
      keepAlive: true,
      title: '商户账单'
    }
  },
  {
    //商户支付查询
    path: '/payment',
    name: 'payment',
    component: Payment,
    meta: {
      title: '商户支付查询'
    }
  },
  {
    //任务调账
    path: '/adjustment',
    name: 'adjustment',
    component: Adjustment,
    meta: {
      title: '任务调账'
    }
  },
  {
    //人才调账
    path: '/billAdjust',
    name: 'billAdjust',
    component: Billadjust,
    meta: {
      title: '人才调账明细'
    }
  },
  {
    //调账明细
    path: '/adjustmentlist',
    name: 'adjustmentlist',
    component: AdjustmentList,
    meta: {
      title: '任务调账明细'
    }
  },
  {
    //商户账单明细列表
    path: '/shopPayDetail',
    name: 'shopPayDetail',
    component: ShopPayDetail
  },
  {
    //商户订单支付查询
    path: '/orderTradeList',
    name: 'orderTradeList',
    component: OrderTradeList,
    meta: {
      title: '商户订单支付查询'
    }
  },
  {
    //店铺运营报表
    path: '/shopSheet',
    name: 'shopSheet',
    component: ShopSheet,
    meta: {
      title: '店铺运营报表'
    }
  },
  {
    //人才运营报表
    path: '/userSheet',
    name: 'userSheet',
    component: UserSheet,
    meta: {
      title: '人才运营报表'
    }
  },
  {
    //人才数据查询
    path: '/talentQuery',
    name: 'talentQuery',
    component: TalentQuery,
    meta: {
      title: '人才数据查询'
    }
  },
  {
    //店铺数据查询
    path: '/talentQueryShop',
    name: 'talentQueryShop',
    component: TalentQueryShop,
    meta: {
      title: '店铺数据查询'
    }
  },
  // 财务及数据  -----------报表
  {
    //经营报表
    path: '/businessReport',
    name: 'businessReport',
    component: BusinessReport,
    meta: {
      title: '经营报表'
    }
  },
  {
    //灵活经营报表
    path: '/agileBusinessReport',
    name: 'agileBusinessReport',
    component: AgileBusinessReport,
    meta: {
      title: '灵活经营报表'
    }
  },
  {
    //灵活经营报表（商圈）
    path: '/agileBusinessAreaReport',
    name: 'agileBusinessAreaReport',
    component: AgileBusinessAreaReport,
    meta: {
      title: '灵活经营报表(商圈)'
    }
  },
  {
    //灵活儿应收款报表
    path: '/freelanCecollectionReport',
    name: 'freelanCecollectionReport',
    component: FreelanCecollectionReport,
    meta: {
      title: '灵活儿应收账款报表'
    }
  },
  {
    //灵活儿应收款报表明细
    path: '/reportDetails',
    name: 'reportDetails',
    component: ReportDetails,
    meta: {
      title: '灵活儿应收账款报表'
    }
  },
  {
    //帮助中心
    path: '/helpList',
    name: 'helpList',
    component: HelpList,
    meta: {
      title: '帮助中心'
    }
  },
  {
    //新增帮助主题
    path: '/helpAdd',
    name: 'helpAdd',
    component: HelpAdd,
    meta: {
      title: '新增帮助主题'
    }
  },
  {
    //编辑帮助主题
    path: '/helpEdit',
    name: 'helpEdit',
    component: HelpEdit,
    meta: {
      title: '编辑帮助主题'
    }
  },
  {
    //教程管理
    path: '/courseList',
    name: 'courseList',
    component: CourseList,
    meta: {
      title: '教程管理'
    }
  },
  {
    //新增教程
    path: '/courseAdd',
    name: 'courseAdd',
    component: CourseAdd,
    meta: {
      title: '新增教程'
    }
  },
  {
    //编辑教程
    path: '/courseEdit',
    name: 'courseEdit',
    component: CourseEdit,
    meta: {
      title: '编辑教程'
    }
  },
  {
    //分类管理
    path: '/typeList',
    name: 'typeList',
    component: TypeList,
    meta: {
      title: '分类管理'
    }
  },
  {
    //新增分类
    path: '/typeAdd',
    name: 'typeAdd',
    component: TypeAdd,
    meta: {
      title: '新增分类'
    }
  },
  {
    //编辑分类
    path: '/typeEdit',
    name: 'typeEdit',
    component: TypeEdit,
    meta: {
      title: '编辑分类'
    }
  },
  {
    //出工活动管理
    path: '/workActivities',
    name: 'workActivities',
    component: WorkActivities,
    meta: {
      title: '出工活动管理'
    }
  },
  {
    //拉新活动管理
    path: '/newActivities',
    name: 'newActivities',
    component: NewActivities,
    meta: {
      title: '拉新活动管理'
    }
  },
  {
    // 平台激励
    path: '/platformReward',
    name: 'platformReward',
    component: PlatformReward,
    meta: {
      title: '平台激励'
    }
  },
  {
    // 增加平台激励
    path: '/rewardAdd',
    name: 'rewardAdd',
    component: rewardAdd,
    meta: {
      title: '平台激励'
    }
  },
  {
    //取消/撤回查询
    path: '/cancelQuery', //取消/撤回查询
    name: 'cancelQuery',
    component: CancelQuery,
    meta: {
      title: '取消/撤回查询'
    }
  },
  {
    //评价lie
    path: '/EvaluatList', //商户列表
    name: 'EvaluatList',
    component: EvaluatList,
    meta: {
      title: '评价管理'
    }
  },
  {
    //供应商列表
    path: '/supplierList',
    name: 'supplierList',
    component: SupplierList,
    meta: {
      title: '供应商列表'
    }
  },
  {
    //新增供应商
    path: '/supplierAdd',
    name: 'supplierAdd',
    component: SupplierAdd,
    meta: {
      title: '新增供应商'
    }
  },
  {
    //供应商报表
    path: '/suoolierReport',
    name: 'suoolierReport',
    component: SuoolierReport,
    meta: {
      title: '供应商报表'
    }
  },
  {
    //人才签约管理
    path: '/talentContract',
    name: 'talentContract',
    component: TalentContract,
    meta: {
      title: '人才签约管理'
    }
  },
  {
    //人才签约管理
    path: '/recordList',
    name: 'recordList',
    component: RecordList,
    meta: {
      title: '人才提现记录'
    }
  },
  {
    //付款申请
    path: '/payApplication',
    name: 'payApplication',
    component: PaymentApplication,
    meta: {
      title: '付款申请'
    }
  },
  {
    //结算通道
    path: '/settlementChannel',
    name: 'settlementChannel',
    component: SettlementChannel,
    meta: {
      title: '结算通道'
    }
  },
  {
    //结算通道编辑
    path: '/channelEdit',
    name: 'channelEdit',
    component: ChannelEdit,
    meta: {
      title: '结算通道编辑'
    }
  },

  {
    //请假申请审批
    path: '/personnelLeave',
    name: 'personnelLeave',
    component: PersonnelLeave,
    meta: {
      title: '请假申请审批'
    }
  },
  {
    //供应商报表
    path: '/administrator',
    name: 'administrator',
    component: Administrator,
    meta: {
      title: '账号管理'
    }
  },
  {
    //公告管理
    path: '/announcement',
    name: 'announcement',
    component: Announcement,
    meta: {
      title: '公告管理'
    }
  },
  {
    //新增公告
    path: '/announcementadd',
    name: 'announcementadd',
    component: AnnouncementAdd,
    meta: {
      title: '新增公告'
    }
  },
  {
    //banner管理
    path: '/banner',
    name: 'banner',
    component: Banner,
    meta: {
      title: 'banner管理'
    }
  },
  {
    //新增banner
    path: '/banneradd',
    name: 'banneradd',
    component: BannerAdd,
    meta: {
      title: '新增banner'
    }
  },
  {
    //任务申诉审批
    path: '/taskAppeal',
    name: 'taskAppeal',
    component: TaskAppeal,
    meta: {
      title: '加班报备列表'
    }
  },
  {
    //消息列表
    path: '/pushlist',
    name: 'pushlist',
    component: PushList,
    meta: {
      title: '消息列表'
    }
  },
  {
    //新建任务
    path: '/pushadd',
    name: 'pushadd',
    component: PushAdd,
    meta: {
      title: '新建任务'
    }
  },
  {
    //新建任务
    path: '/fetchlist',
    name: 'fetchlist',
    component: FetchList,
    meta: {
      title: '发送记录查询'
    }
  },
  {
    //代理商
    path: '/agentlist',
    name: 'agentlist',
    component: AgentList,
    meta: {
      title: '代理商'
    }
  },
  {
    //代理商添加
    path: '/agentadd',
    name: 'agentadd',
    component: AgentAdd,
    meta: {
      title: '添加代理商'
    }
  },
  {
    //代理商角色列表
    path: '/agentrolelist',
    name: 'agentrolelist',
    component: AgentRoleList,
    meta: {
      title: '代理商角色'
    }
  },
  {
    //代理商角色列表
    path: '/agentroleadd',
    name: 'agentroleadd',
    component: AgentRoleAdd,
    meta: {
      title: '代理商添加'
    }
  },
  {
    //代理商角色列表
    path: '/agentadminlist',
    name: 'agentadminlist',
    component: AgentAdminList,
    meta: {
      title: '代理商人员'
    }
  },
  {
    //代理商角色列表
    path: '/agentadminadd',
    name: 'agentadminadd',
    component: AgentAdminAdd,
    meta: {
      title: '代理商人员添加'
    }
  },{
    //店铺账号管理
    path: '/shopListAccount',
    name: 'shopListAccount',
    component: ShopListAccount,
    meta: {
      title: '代理商人员添加'
    }
  },
  {
    //商家店铺补贴
    path: '/subsidyShop',
    name: 'subsidyShop',
    component: SubsidyShop,
    meta: {
      title: '商家店铺补贴'
    }
  },
  {
    //补贴 添加
    path: '/subsidyAdd',
    name: 'subsidyAdd',
    component: SubsidyAdd,
    meta: {
      title: '补贴添加'
    }
  },
  {
    //商圈补贴
    path: '/subsidyArea',
    name: 'subsidyArea',
    component: SubsidyArea,
    meta: {
      title: '商圈补贴'
    }
  },
  {
    path: '/staff-scale-report',
    name: 'staffScaleReport',
    component: StaffScaleReport,
    meta: {
      title: '人才规模报表'
    }
  },
  {
    path: '/shop-scale-report',
    name: 'shopScaleReport',
    component: ShopScaleReport,
    meta: {
      title: '店铺规模报表'
    }
  },
  {
    path: '/area-scale-report',
    name: 'areaScaleReport',
    component: AreaScaleReport,
    meta: {
      title: '店铺商圈规模报表'
    }
  },
  {
    path: '/invoice-list',
    name: 'invoiceList',
    component: InvoiceList,
    meta: {
      title: '发票管理'
    }
  },
  {
    path: '/invoice-details',
    name: 'invoiceDetails',
    component: InvoiceDetails,
    meta: {
      title: '发票详情'
    }
  },
  {
    path: '/invoice-task-list',
    name: 'invoiceTaskList',
    component: InvoiceTaskList,
    meta: {
      title: '明细'
    }
  },
  {
    path: '/invoice-statement-list',
    name: 'invoiceStatementList',
    component: InvoiceStatementList,
    meta: {
      title: '明细'
    }
  }
]

// 动态路由，基于用户权限动态去加载
export const dynamicRoutes = [
  {
    path: '/system/user-auth',
    component: Layout,
    hidden: true,
    permissions: ['system:user:edit'],
    children: [
      {
        path: 'role/:userId(\\d+)',
        component: () => import('@/views/system/user/authRole'),
        name: 'AuthRole',
        meta: { title: '分配角色', activeMenu: '/system/user' }
      }
    ]
  },
  {
    path: '/system/role-auth',
    component: Layout,
    hidden: true,
    permissions: ['system:role:edit'],
    children: [
      {
        path: 'user/:roleId(\\d+)',
        component: () => import('@/views/system/role/authUser'),
        name: 'AuthUser',
        meta: { title: '分配用户', activeMenu: '/system/role' }
      }
    ]
  },
  {
    path: '/system/dict-data',
    component: Layout,
    hidden: true,
    permissions: ['system:dict:list'],
    children: [
      {
        path: 'index/:dictId(\\d+)',
        component: () => import('@/views/system/dict/data'),
        name: 'Data',
        meta: { title: '字典数据', activeMenu: '/system/dict' }
      }
    ]
  },
  {
    path: '/monitor/job-log',
    component: Layout,
    hidden: true,
    permissions: ['monitor:job:list'],
    children: [
      {
        path: 'index',
        component: () => import('@/views/monitor/job/log'),
        name: 'JobLog',
        meta: { title: '调度日志', activeMenu: '/monitor/job' }
      }
    ]
  },
  {
    path: '/tool/gen-edit',
    component: Layout,
    hidden: true,
    permissions: ['tool:gen:edit'],
    children: [
      {
        path: 'index',
        component: () => import('@/views/tool/gen/editTable'),
        name: 'GenEdit',
        meta: { title: '修改生成配置', activeMenu: '/tool/gen' }
      }
    ]
  }
]

export default new Router({
  mode: 'history', // 去掉url中的#
  scrollBehavior: () => ({ y: 0 }),
  routes: constantRoutes
})
